How to use the generator utility

This tool allows to generate synthetic photometry in a set of available systems from the input internally-calibrated continuously-represented mean spectra.

Information about the units of the variables used in this tutorial can be found here.

For a number of systems a standardisation procedure has been carried out to minimise zero point differences and/or trends as a function of colour (see Montegriffo et al. 2022). These are available in GaiaXPy by using the "_Std" version of the desired photometric system.

Basic usage

The generator returns a single output:

  1. A DataFrame of all synthetic photometry results. The DataFrame contains the magnitudes, fluxes and flux errors for each band in the system.

A list of PhotometricSystem objects is also accepted.

Input types

The input does not have to be a path to a file. There are other options: a pandas DataFrame, an ADQL query or a list of sourceIds.

Passing a DataFrame

Running a query

The generator can also take the parameters 'username' and 'password' for Cosmos credentials, instead of using the interactive login (like in the example below). See that information here.

Passing a list

A list of sourceIds can be passed to the generator as the first argument. The generator will then query the Archive for these objects.

The generator can also take the parameters 'username' and 'password' for Cosmos credentials, instead of using the interactive login (like in the example below). See that information here.

Advanced usage

The generator offers access to another functionality via the optional parameter "error_correction".

Error correction

An analysis based on a dataset of sources for which the available observations per source were randomly split in two sets thus leading to the generation of two mean spectra for each object, has shown that errors on synthetic photometry are somewhat underestimated.

This same dataset has been used to compute empirical corrections to the uncertainties (see Montegriffo et al. 2022). These corrections are available in GaiaXPy and can be activated when generating synthethic photometry.

Colour equation and error correction

Both options colour_equation and error_correction can be True at the same time. The error correction needs the Gaia_DR3_Vega system to be present in the input data, so the system is internally added and then removed before returning the results.

Additional parameters

Additional arguments can be passed to the generator.

These are:

  1. output_path
  2. output_file
  3. output_format
  4. save_file

Three parameters: output_path, output_file, and output_format define the entire path of the resulting file.

The default output path is the current path. If the given output path does not exist, it will be created.

The default output file name is 'output_spectra'.

The default output format is the format of the input file (i.e. if the input file is a 'fits', then the output file will be a FITS file by default.), or CSV in any other case (DataFrame, ADQL query or list).

NOTE: If a file with the same path and name already exists, it will be AUTOMATICALLY OVERWRITTEN.

The additional parameter save_file is a boolean that tells the program whether to save the results or not. If 'output_file' is given but 'save_file' is set to False, a warning will be raised.